<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/hmtBook/Public/css/list_header.css">
<link rel="stylesheet" type="text/css" href="/hmtBook/Public/css/bootstrap.min.css">
<script type="text/javascript"src="/hmtBook/Public/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript"src="/hmtBook/Public/js/bootstrap.min.js"></script>
<style>
#myAlert{
display:none;
}

#content{margin:10px;}

</style>
<script>

$(document).ready(function(){

	
	$("#submit").click(function(){
		$.ajax({
		    cache: true,
		    type: "POST",
		    url:"/hmtBook/index.php/Home/List/editUserInfo",
		    data:$('#form1').serialize(),// 你的formid
		    async: false,
		    error: function(request) {
		        alert("Connection error");
		    },
		    success: function(data) {
		    	alert(data);
		    }
		});
	});
	
});

</script>
<title><?php echo (session('username')); ?>的个人信息</title>
</head>
<body>
<div id="header"class="navbar">
<div class="navbar-inner">
<ul class="inline unstyle nav">
<li class="dropdown">
<a dropdown-toggle" data-toggle="dropdown" data-target="#">首页<b class="caret"></b></a>

<ul class="dropdown-menu"  role="menu" aria-labelledby="dLabel">
<li><a href="/hmtBook/index.php/Home/Index">红满堂之家 </a>  </li>
<li class="divider"></li>
<li><a href="/hmtBook/index.php/Home/List/">通讯录 </a>  </li>
<li><a href="#">内部福利 </a>  </li>
<li><a href="#">光荣榜 </a>  </li>
</ul>
</li>
<li><a href="/hmtBook/index.php/Home/List/help">帮助</a></li>
<li><a href="/hmtBook/admin.php/Home/index/index">后台</a></li>
<li>
<form action="#" method="post"class="form-search navbar-form pull-left">
<div class="input-append">
    <input type="text" class="span3 search-query ">
    <button type="submit" class="btn ">搜索</button>
  </div>
<a  href="http://hometown.scau.edu.cn/" class="btn btn-info">进入红满堂论坛</a>
</form>
</li>

<li><p class="navbar-text">欢迎你,<?php echo (session('username')); ?></p></li>
<li><a href="/hmtBook/index.php/Home/List/editUserInfo">个人信息</a></li>
<li><a href="/hmtBook/index.php/Home/List/synUpdate">从论坛同步信息</a></li>
<li><a href="">BUG反馈</a></li>
<li><a href="/hmtBook/index.php/Home/List/logout">退出登录</a></li>

</ul>
</div>

</div>

<div id="myAlert" class="alert alert-warning ">
   <a href="#" class="close" data-dismiss="alert">
   &times;
   </a>
   <span><strong>亲！</strong>您尚未完善个人信息哦！</span>
</div>
<div id="content">
<form action=""method="post"id="form1">
<ul>
<li>红满堂账号：<?php echo ($user["username"]); ?><span class="badge"><?php echo ($userflag); ?></span></li>
<li>红满堂UID：<?php echo ($user["hmt_uid"]); ?></li>
<li>红满堂用户组：<?php echo ($user["bbs_group"]); ?></li>
<li>所属分组：
<select name="group_id">
<option selected><?php echo ($user["groupname"]); ?></option>
<?php if(is_array($groupselect)): $i = 0; $__LIST__ = $groupselect;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["groupname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select></li>
<li>*真名：<input type="text" name="truename" value="<?php echo ($user["truename"]); ?>"></li>
<li>*性别：<select name="sex">
<?php if(isset($sex)): ?><option value="<?php echo ($user["sex"]); ?>"><?php echo ($user["sex"]); ?></option><?php endif; ?>
<option value="男">男</option>
<option value="女">女</option>
<option value="不男不女">不男不女</option>
</select></li>
<li>学号：<input type="text" name="student_id"value="<?php echo ($user["student_id"]); ?>"></li>
<li>*年级：<input type="text"name="grade" value="<?php echo ($user["grade"]); ?>"></li>
<li>*学院：<input type="text" name="college"value="<?php echo ($user["college"]); ?>"></li>
<li>*专业：<input type="text" name="subject"value="<?php echo ($user["subject"]); ?>"></li>
<li>*长号：<input type="text" name="longnum"value="<?php echo ($user["longnum"]); ?>"></li>
<li>短号：<input type="text" name="shortnum"value="<?php echo ($user["shortnum"]); ?>"></li>
<li>*qq：<input type="text" name="qq"value="<?php echo ($user["qq"]); ?>"></li>
<li>微博：<input type="text" name="microblog"value="<?php echo ($user["microblog"]); ?>"></li>
<li>微信：<input type="text" name="weixin"value="<?php echo ($user["weixin"]); ?>"></li>
<li>宿舍地址：<input type="text" name="address"value="<?php echo ($user["address"]); ?>"></li>

<li>一句话介绍自己<textarea name="message"value="<?php echo ($user["messgae"]); ?>"rows="2" cols="30"/></textarea></li>
<li>在红满堂任职时间<input type="text"name="hmt_worktime"value="<?php echo ($user["hmt_worktime"]); ?>"></li>
<li>毕业后任职公司<input type="text"name="company"value="<?php echo ($user["company"]); ?>"></li>
<li>毕业后所在城市<input type="text"name="work_city"value="<?php echo ($user["work_city"]); ?>"></li>
<li><input type="button" value="保存修改"class="btn"id="submit" ><a class="btn" href="javascript:history.go(-1);">返回</a></li>
</ul>
</form>
</div>
</body>
</html>